from sqlalchemy import Column, Integer, String, SmallInteger, DECIMAL, Text
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class CouponLocation(Base):
    __tablename__ = 'ims_coupon_location'

    id = Column(Integer, primary_key=True, index=True)
    uniacid = Column(Integer, nullable=False)
    acid = Column(Integer, nullable=False)
    sid = Column(Integer, nullable=False)
    location_id = Column(Integer, nullable=False)
    business_name = Column(String(50), nullable=False)
    branch_name = Column(String(50), nullable=False)
    category = Column(String(255), nullable=False)
    province = Column(String(15), nullable=False)
    city = Column(String(15), nullable=False)
    district = Column(String(15), nullable=False)
    address = Column(String(50), nullable=False)
    longitude = Column(String(15), nullable=False)
    latitude = Column(String(15), nullable=False)
    telephone = Column(String(20), nullable=False)
    photo_list = Column(Text, nullable=False)
    avg_price = Column(Integer, nullable=False)
    open_time = Column(String(50), nullable=False)
    recommend = Column(String(255), nullable=False)
    special = Column(String(255), nullable=False)
    introduction = Column(String(255), nullable=False)
    offset_type = Column(SmallInteger, nullable=False)
    status = Column(SmallInteger, nullable=False)
    message = Column(String(255), nullable=False)